<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<link rel="stylesheet" href="<?php echo base_url()?>skins/default/jquery.cluetip.css" type="text/css" />
<script src="<?php echo base_url()?>js/jquery.cluetip.js" type="text/javascript"></script>
<div class="middle padtop10 myclear">
	<div class="page-content">
		
		<!-- bread crumb -->
		<p id="bread-crumb">
			<a href="<?php echo base_url();?>">
				<?php echo $lang['home']?>
			</a>
			<a href="<?php echo site_url('user');?>">
				<?php echo $lang['user']?>
			</a>
			<?php echo $lang['zone']?>
		</p><!-- end bread crumb -->
		
		<h3>
			<?php echo $lang['zone']?>
		</h3>
		<br style="clear:both;" />
		
		<?php
		$msg = trim($this->input->get('msg',true));
		if($msg != ''){
		?>
		<p class="msg"><?php echo $msg;?></p>
		<br />
		<?php }?>
		
		<div class="list-zone">
			<p align="right"><input type="button" value="<?php echo $lang['create']?>" onclick="window.location.href='<?php echo site_url('user/addzone')?>'" /></p>
			<table cellpadding="0" cellspacing="0" width="100%" border="1" class="martop10 tbl-list">
			<tr>
				<td class="td-label" width="1%" style="text-align:center"><strong>#</strong></td>
				<td class="td-label" width="20%"><strong><?php echo $lang['zone_name']?></strong></td>
				<td class="td-label" width="10%"><strong><?php echo $lang['preview']?></strong></td>
				<td class="td-label" width="10%"><strong><?php echo $lang['edit']?></strong></td>
			</tr>
			<?php foreach($zones as $item){?>
			<tr>
				<td style="text-align:center"><?php echo $item['zoneid']?></td>
				<td><a href="<?php echo site_url('user/viewzone/?id='.$item['zoneid'])?>">
					<?php echo $item['zonename']?>
				</a>
				</td>
				<td><a class="my-cluetip" rel="<?php echo site_url('user/preview_format/?id='.$item['formatid'])?>" href="#" title="<?php echo $item['zonename']?>">
					<?php echo $lang['zone_preview']?>
					</a>
				</td>
				<td><a href="<?php echo site_url('user/editzone/?id='.$item['zoneid'])?>" title="<?php echo $item['zonename']?>">
					<?php echo $lang['edit']?>
					</a>
				</td>
			</tr>
			<?php }?>
			</table>
		</div>
	</div>
</div>
<script language="javascript">
$(document).ready(function(){
	$('.my-cluetip').each(function(){
		$(this).cluetip({sticky: true, closePosition: 'title', arrows: true});
	});
	
});
</script>